import request from '@/utils/request'
import qs from "qs";

export function findListByPage(params) {
  return request({
    url: 'api/sourceConfTemplate' + '?' + qs.stringify(params, { indices: false }),
    method: 'get'
  })
}

export function add(data) {
  return request({
    url: 'api/sourceConfTemplate',
    method: 'post',
    data
  })
}

export function edit(data) {
  return request({
    url: 'api/sourceConfTemplate',
    method: 'put',
    data
  })
}

export function del(ids){
  return request({
    url: 'api/sourceConfTemplate',
    method: 'delete',
    data: ids
  })
}

export function enable(pkId){
  return request({
    url: 'api/sourceConfTemplate/startUp/' + pkId,
    method: 'patch'
  })
}

export function disable(pkId){
  return request({
    url: 'api/sourceConfTemplate/shutDown/' + pkId,
    method: 'patch'
  })
}

export default { add, edit, del, enable, disable, findListByPage}
